import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import PlayListDetail from '../components/playListDetail/PlayListDetail.vue'
import TalentShowPlayListDetail from '../components/talentShowPlayListDetail/TalentShowPlayListDetail.vue'
import SoaringListv from '../components/ranking/SoaringList.vue'
import RankThird from '../components/rankThird/RankThird.vue'
Vue.use(VueRouter)


//林木森5月18日完成下面代码
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: '/rank',
    name: 'Rank',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/Rank.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/playlistdetail/:id',
    name: 'PlayListDetail',
    component: PlayListDetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/talentShowPlayListDetail/:id',
    name: 'TalentShowPlayListDetail',
    component: TalentShowPlayListDetail,
    meta: {
      showTab: false
    }
  },
  {
    path: '/soaringList/:id',
    name: 'SoaringList',
    component: SoaringListv,
    meta: {
      showTab: false
    }
  },
  {
    path: '/rankthird/:id',
    name: 'RankThird',
    component: RankThird,
    meta: {
      showTab: false
    }
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
